package com.sale.succ.objects;

import java.util.Date;
import java.util.HashSet;

public class Session {
	// TODO clients properties
	private HashSet clients = new HashSet();
	private HashSet tradeMarks = new HashSet();
	private HashSet grclients = new HashSet();

	public void clearAllMarks() {
		clients.clear();
		tradeMarks.clear();
		grclients.clear();
	}

	public void addClientId(String clientId) {
		clients.add(clientId);
	}

	public boolean containsClientId(String clientId) {
		return clients.contains(clientId);
	}

	public void addTradeMarkId(String markId) {
		tradeMarks.add(markId);
	}

	public boolean containsTradeMarkId(String tradeMarkId) {
		return tradeMarks.contains(tradeMarkId);
	}

	public void addGrClient(String grClientId) {
		grclients.add(grClientId);
	}

	public boolean containsGrClientId(String grClientId) {
		return grclients.contains(grClientId);
	}

	private boolean certificates;

	public boolean isCertificates() {
		return certificates;
	}

	public void setCertificates(boolean certificates) {
		this.certificates = certificates;
	}

	public boolean isAsFact() {
		return asFact;
	}

	public void setAsFact(boolean asFact) {
		this.asFact = asFact;
	}

	public boolean isMoneyCondition() {
		return moneyCondition;
	}

	public void setMoneyCondition(boolean moneyCondition) {
		this.moneyCondition = moneyCondition;
	}

	public boolean isTablet() {
		return tablet;
	}

	public void setTablet(boolean tablet) {
		this.tablet = tablet;
	}

	public boolean isExchange() {
		return exchange;
	}

	public void setExchange(boolean exchange) {
		this.exchange = exchange;
	}

	private boolean asFact;
	private boolean moneyCondition;
	private boolean tablet;
	private boolean exchange;	
	private static Session session;
	private String fw;

	public String getFw() {
		return fw;
	}

	public void setFw(String fw) {
		this.fw = fw;
	}

	private Date payDate;
	private Date giveDate;

	public Date getGiveDate() {
		return giveDate;
	}

	public void setGiveDate(Date giveDate) {
		this.giveDate = giveDate;
	}

	private String notes;

	public String getNotes() {
		return notes;
	}

	public void setNotes(String notes) {
		this.notes = notes;
	}

	public Date getPayDate() {
		return payDate;
	}

	public void setPayDate(Date payDate) {
		this.payDate = payDate;
	}

	public static Session getInstance() {
		if (session == null) {
			session = new Session();
		}

		return session;
	}

	private String clientId;
	private String tradeId;
	private String groupId;

	public String getGroupId() {
		return groupId;
	}

	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}

	public String getTradeId() {
		return tradeId;
	}

	public void setTradeId(String tradeId) {
		this.tradeId = tradeId;
	}

	public String getClientId() {
		return clientId;
	}

	public void setClientId(String clientId) {
		this.clientId = clientId;
	}
	
	private String login;
	private String password;

	public String getLogin() {
		return login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
}
